#include<stdio.h>
struct TreeNode {
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
};
void preorder(struct TreeNode* root, int* arr, int* returnSize) {
    if (root == NULL) {
        return;
    }
    arr[(*returnSize)++] = root->val;
    preorder(root->left, arr, returnSize);
    preorder(root->right, arr, returnSize);
}
int* preorderTraversal(struct TreeNode* root, int* returnSize) {
    int* arr = (int*)malloc(100 * sizeof(int));
    *returnSize = 0;
    preorder(root, arr, returnSize);
    return arr;
}
int main()
{
	return 0;
}